from .config import app
from pydantic import BaseModel
from .grade_agent import process_query

class QuestionRequest(BaseModel):
    content: str

class AnswerResponse(BaseModel):
    content: str

@app.post("/api/ask")
async def ask_question(request: QuestionRequest) -> AnswerResponse:
    answer = process_query(request.content)
    return AnswerResponse(content=answer)

